<?php
include_once $_SERVER['DOCUMENT_ROOT'].'/include.php';
$web_conf_file_path= __DIR__ . '/../conf/web_conf.txt';
function csv_get($file_path,$key)
{
    $contents=file_get_contents($file_path);
    $array_1=explode("\r\n",$contents);
    $array_2=array();
    for($i=0;$i<count($array_1);$i++)
    {
       if(trim($array_1[$i])==''||substr($array_1[$i],0,2)=='//')
       {
           continue;
       }else
       {
           $head_location=strpos($array_1[$i],'[');
           $end_location=strpos($array_1[$i],']');
           $array_key=substr($array_1[$i],$head_location+1,$end_location-1);
           $array_value=ltrim(strstr($array_1[$i],'='),'=');
           if($key==$array_key)
           {
               break;
           }
           $array_2["$array_key"]=$array_value;
       }
    }
    return $array_value;
}
function csv_get_web_conf($key)
{
    global $web_conf_file_path;
    return csv_get($web_conf_file_path,$key);
}